package za.co.EYEWTKAH.spring.jms.embedded;

import org.apache.activemq.ActiveMQConnectionFactory;

public class ActiveMQConnectionFactoryBuilder extends
		EmbeddedConnectionFactoryBuilder {

	private ActiveMQConnectionFactory cf;

	public ActiveMQConnectionFactoryBuilder(
			EmbeddedConnectionFactoryConfiguration configuration) {
		super(configuration);

	}

	@Override
	public EmbeddedConnectionFactory getConnectionFactory()
			throws EmbeddedConnectionFactoryException {
		cf = new ActiveMQConnectionFactory(
				"vm://localhost?broker.persistent=false");

		return proxy(this, cf);
	}

	@Override
	public void shutDown() throws EmbeddedConnectionFactoryException {
		cf = null;
	}

}
